package test7;

public class Demo extends A{
    @Override
    boolean show(char a) {
        System.out.println(a);
        return false;
    }
    public static void main(String[] args) {
        int i=0;
        A a = new Demo();
        Demo d = new Demo();
        for (a.show('A'); a.show('B')&&i<'Z'; d.show('C')){
            i++;
            d.show('D');
        }
    }
}
class A {
    boolean show(char a) {
        System.out.println(a);
        return true;
    }
}